GravityController
The gravity component lets you control gravity of the creation.
Functions
setGravityEnabled
GravityController.setGravityEnabled( bool )
Enables or disables the gravity multiplier.
Arguments:
- bool [ boolean ] If it it should be enabled or not.
setMultiplier
GravityController.setMultiplier( multiplier )
Sets the gravity multiplier for the attached creation.
Arguments:
- multiplier [ number ] The gravity multiplier to apply.
getMultiplier
GravityController.getMultiplier()
Gets the current gravity multiplier.
Returns:
- [ number ] The current gravity multiplier.
getBodyMass
GravityController.getBodyMass()
Gets the mass of the body that the gravity controller is placed on.
Returns:
- [ number ] The body mass.
getCreationMass
GravityController.getCreationMass()
Gets the mass of the creation that the gravity controller is placed on.
Returns:
- [ number ] The creation mass.